package org.flower.web.servlet;

import org.flower.dao.UserDao;
import org.flower.dao.impl.UserDaoImpl;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.annotation.*;
import java.io.IOException;

@WebServlet("/manager/userStateServlet")
public class userStateServlet extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

    }

    @Override
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        String uid = request.getParameter("uid");
        UserDao userDao = new UserDaoImpl();
        if(userDao.updataStateById(Integer.parseInt(uid))){
            response.getWriter().print(true);
        }
    }
}
